<div>
    <?php foreach ($exercises as $exercise) { ?>
    <a href="<?php echo $this->url->get('teacher/generateTest/' . $exercise->id); ?>">
        <div class="col-md-4 col-sm-6 col-xs-12">
            <img src="<?php echo 's'; ?>"/>
            <label><?php echo $exercise->name; ?></label>
            <?php if ($exercise->startTime) { ?>
            <span><?php echo date('Y-m-d H:i:s', $exercise->startTime) . '-' . date('Y-m-d H:i:s', $exercise->endTime); ?></span>
            <?php } ?>
        </div>
    </a>
    <?php } ?>
</div>